.class Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;
.super Landroid/webkit/WebViewClient;
.source "ContentLoaderWebView.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "WebClient"
.end annotation


# instance fields
.field private final mUiHandler:Landroid/os/Handler;

.field final synthetic this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;


# direct methods
.method private constructor <init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;)V
    .locals 1
    .parameter

    .prologue
    .line 89
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;

    invoke-direct {p0}, Landroid/webkit/WebViewClient;-><init>()V

    .line 94
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;->mUiHandler:Landroid/os/Handler;

    return-void
.end method

.method synthetic constructor <init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 89
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;)V

    return-void
.end method


# virtual methods
.method cancel()V
    .locals 1

    .prologue
    .line 112
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;->mUiHandler:Landroid/os/Handler;

    invoke-virtual {v0, p0}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 113
    return-void
.end method

.method public onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 3
    .parameter "view"
    .parameter "url"

    .prologue
    .line 103
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;

    iget-boolean v0, v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;->mCancelled:Z

    if-nez v0, :cond_0

    .line 104
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;->mUiHandler:Landroid/os/Handler;

    const-wide/16 v1, 0x5dc

    invoke-virtual {v0, p0, v1, v2}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 106
    :cond_0
    return-void
.end method

.method public onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .locals 0
    .parameter "view"
    .parameter "url"
    .parameter "favicon"

    .prologue
    .line 98
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;->cancel()V

    .line 99
    return-void
.end method

.method public run()V
    .locals 3

    .prologue
    .line 117
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 118
    const-string v0, "javascript:var html = null; try{html = window.document.getElementsByTagName(\'html\')[0].innerHTML}catch(e){};alert(html);"

    .line 119
    .local v0, jsCode:Ljava/lang/String;
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView$WebClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;

    const-string v2, "javascript:var html = null; try{html = window.document.getElementsByTagName(\'html\')[0].innerHTML}catch(e){};alert(html);"

    invoke-virtual {v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ContentLoaderWebView;->loadUrl(Ljava/lang/String;)V

    .line 120
    return-void
.end method
